import 'package:flutter/material.dart';

class Show {
  Future<bool?> showNormalDialog(context, Widget widget)async {
    return await showDialog<bool>(context: context, builder: (context) => widget);
  }

  Widget deleteAlert(context) {
    return AlertDialog(
      title: const Text("提示"),
      content: const Text("您确定要执行删除吗?"),
      actions: <Widget>[
        FlatButton(
          child: const Text("取消"),
          onPressed: () => Navigator.of(context).pop(),
        ),
        FlatButton(
            child: const Text("删除"),
            onPressed: () => Navigator.of(context).pop(true)),
      ],
    );
  }
}
